package monkey;

import java.util.Scanner;

public class Main {
    public static void main(String args[]) throws Exception {
        SeqList<Integer> sq = new SeqList<Integer>(); // 空表
        sq.insert(0,1);
        sq.insert(1,2);
        sq.insert(2,3);
        sq.insert(3,4);
        sq.insert(4,5);
        sq.insert(5,6);
        sq.insert(6,7);
        sq.insert(7,8);
        sq.insert(8,9);
        sq.insert(9,10);

        System.out.println(sq);

        Scanner sc = new Scanner(System.in);
        System.out.println("请输入剩余桃子数目：");
        int num1 = sc.nextInt();

        Scanner ac = new Scanner(System.in);
        System.out.println("今天是第几天：");
        int day = ac.nextInt();

        sq.set(day-1,num1);
        System.out.println(sq);


        sq.set(day-1,num1);
        for (int i = day - 2; i >= 0; i--) {

            sq.set(i,((sq.get(i+1)+1)*2));

        }
        System.out.println(sq);





    }

}
